﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MutFormStudio {
	public partial class IndependentStudioForm : Form {
		private IndependentStudioForm() {
			InitializeComponent();
		}

		public Studio MainSTU { get; set; }

		public IndependentStudioForm(Studio main_studio) {
			MainSTU = main_studio;
			InitializeComponent();
			Controls.Add(MainSTU);
			MainSTU.Dock = DockStyle.Fill;
			this.FormClosing += IndependentStudioForm_FormClosing;

		}
		private void IndependentStudioForm_FormClosing(object sender, FormClosingEventArgs e) {
			if (false == MainSTU.closeSubControl()) {
				e.Cancel = true;
			} else {
				MainSTU.Base_studio.studios.Remove(MainSTU);
			}
		}



	}
}
